import { ElMessage } from "element-plus";
import router from "@/router/index";
import userStore from "@/store/user";


/**
 * 处理登录过期
 */
export function handleUnauthorized() {
  ElMessage.error("登录已过期，请重新登录！");
  userStore.commit("SET_TOKEN", "");
  userStore.commit("REMOVE_USER_INFO");
  router.push("/login");
}